-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Only try to modify file times of a writable file on Windows #128977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Documented here in the Windows API. LGTM, feel free to r=me once CI is green. |
|
@bors r- 2024-08-12T08:09:07.8523294Z �[1m�[32m Compiling�[0m clap_derive v4.5.5 |
|
... wat |
|
It's possible that some files are not writable on Linux (not sure if it's because of Docker or something else), but it was possible to set their modification times (?). Would be useful to see the path for which the mtime modification failed. |
|
The code that failed is this section: Lines 1785 to 1794 in 13c36f1
It should be writeable because the file was just copied. But setting the permissions may make it unable to be reopen with write access. |
13c36f1 to
73132a9
Compare
|
Hm, my money is currently on read-only things (on CI) that I am trying to open as writable. I'll run a try-job to see which path causes the failure. |
|
@bors try |
That's a good point. Maybe just reordering the file time modification and the permissions setting could fix it? |
This comment has been minimized.
This comment has been minimized.
(We can't do that AFAICT because as I understand it the set file times is there because |
|
almost certainly failed in #129142 |
|
@bors r- |
This comment has been minimized.
This comment has been minimized.
2e7e619 to
26fae1e
Compare
|
Ah there's a new |
|
@rustbot ready |
|
It's not new, it's just now required to pass it to Thanks! @bors r+ |
Looking forward to it 👀 |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (8fbdc04): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary -2.6%, secondary 1.0%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 749.902s -> 751.027s (0.15%) |
Introduces a
set_file_timeshelper which opens a given path as a file in r+w mode on Windows and then sets file times. Previously the file was open as read-only for Windows which caused permission errors locally.This should hopefully make setting file times less error prone, since trying to set file times on read-only file on Windows also happened in #127850.
try-job: dist-loongarch64-musl
try-job: x86_64-msvc